The present invention relates to a microprocessor and, more particularly, to a microprocessor executing a microprogram (called hereinafter "microprogram controller") based on a received macroinstruction.
In a microprogram controller, each of instructions to be executed is programmed by a user as a form of macroinstruction and is performed in the microprogram controller after being converted into a string of microinstructions corresponding to the received macroinstruction. The respective strings of microinstructions corresponding to all the possible macroinstructions are preliminarily stored or written into a microinstruction memory. Each of the macroinstructions has a specific address information for designating a leading microinstruction of the corresponding string of microinstruction.
Specifically, the address information peculiar to the macroinstruction to be executed is loaded to a microaddress register and is used to access the microinstruction memory for reading out a microinstruction therefrom. The read/out microinstruction is then latched in a microinstruction register and executed by a microinstruction execution control unit. When the microinstruction read out of the memory is latched in the microinstruction register, the content of the microaddress register is updated by one, so that a next microinstruction is read out of a next address of the memory. This next microinstruction is latched in the microinstruction register and executed by the execution control unit after the execution of the current microinstruction is completed. When the execution of the string of microinstruction corresponding to the current macroinstruction is completed, the address information of a new macroinstruction to be executed next is loaded to the microaddress register.
Thus, the string of microinstructions corresponding to the macroinstruction to be executed is initiated after the content of the microaddress register is settled by being loaded with the address information of the macroinstruction to be executed and the leading microinstruction is read out of the memory. The actual start of executing the string of microinstructions is thereby delayed and the completion of the string of microinstructions is delayed accordingly.